def _main():
    n = 1000
    result = 2.0
    for n in range(1, n + 1):
        upper = (2.0 * n) ** 2
        lower = (2.0 * n - 1) * (2.0 * n + 1)
        result *= upper / lower

    import math
    print(f"算得 {result} ，而 math.pi 为 {math.pi} 。增大 n 的值可以提高精度。")


if __name__ == "__main__":
    _main()
